var UserModel=require('../models/users')

const userLogin = (req, res, next) => {
    var user = req.session.loginUser;
    if (user) {
        next();
    } else { 
        res.redirect('/login');
    }
}
module.exports = userLogin;